package day08;

/*
 * Author: JacksonCoder
 * FileName: CharStreamExample
 * Version: 1.0.0
 * Date: 2025/4/15
 */
import java.io.*;

public class CharStreamExample {
    public static void main(String[] args) {
        try (FileReader reader = new FileReader("input.txt");
             FileWriter writer = new FileWriter("output.txt")) {
            int ch;
            while ((ch = reader.read()) != -1) {
                writer.write(ch);
            }
            System.out.println("Characters copied.");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
